<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of mmw_core_RequestRegistry
 *
 * @author Manu
 */
class mmw_core_RequestRegistry {
    private static $instance;
    private $values=array();
    
    private function __construct() { }
    
    private static function instance() {
        if (!isset(self::$instance)) { self::$instance=new self(); }
        return self::$instance;
    }
    
    protected function get($key) {
        if (isset($this->values[$key])) {
            return $this->values[$key];
        }
        return  null;
    }
    
    protected function set($key,$value) {
        $this->values[$key]=$value;
    }
    
    public static function getRequest() {
        return self::instance()->get('request');
    }
    
    public static function setRequest(mmw_controller_Request $request) {
        self::instance()->set('request',$request);
    }
}

?>
